// Created by Xslt generator for Eclipse.
// XSL used : C:\eclipse\plugins\com.cross.easystruts.eclipse_0.6.4\xslt\JavaClass.xsl

package ro.gateway.aida.struts.form;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/** 
 * EditGroupForm.java created by EasyStruts - XsltGen.
 * http://easystruts.sf.net
 * created on 09-12-2003
 * 
 * XDoclet definition:
 * @struts:form name="editGroupForm"
 */
public class EditGroupForm extends ActionForm {

	// --------------------------------------------------------- Instance Variables

	/** userAdd property */
	private long userAdd;

	/** description property */
	private String description;

	/** sgAdd property */
	private int sgAdd;

	/** role property */
	private int role;

	/** name property */
	private String name;

	/** id property */
	private int id;

	// --------------------------------------------------------- Methods

	/** 
	 * Method validate
	 * @param ActionMapping mapping
	 * @param HttpServletRequest request
	 * @return ActionErrors
	 */
/*	public ActionErrors validate(
		ActionMapping mapping,
		HttpServletRequest request) {

	throw new UnsupportedOperationException("Generated method 'validate(...)' not implemented.");
	}*/

	/** 
	 * Method reset
	 * @param ActionMapping mapping
	 * @param HttpServletRequest request
	 */
	public void reset(ActionMapping mapping, HttpServletRequest request) {
		userAdd = 0;
		description = "";
		sgAdd = 0;
		role = 0;
		name = "";
		id = 0;

	}

	/** 
	 * Returns the userAdd.
	 * @return String
	 */
	public long getUserAdd() {
		return userAdd;
	}

	/** 
	 * Set the userAdd.
	 * @param userAdd The userAdd to set
	 */
	public void setUserAdd(long userAdd) {
		this.userAdd = userAdd;
	}

	/** 
	 * Returns the description.
	 * @return String
	 */
	public String getDescription() {
		return description;
	}

	/** 
	 * Set the description.
	 * @param description The description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/** 
	 * Returns the sgAdd.
	 * @return String
	 */
	public int getSgAdd() {
		return sgAdd;
	}

	/** 
	 * Set the sgAdd.
	 * @param sgAdd The sgAdd to set
	 */
	public void setSgAdd(int sgAdd) {
		this.sgAdd = sgAdd;
	}

	/** 
	 * Returns the role.
	 * @return String
	 */
	public int getRole() {
		return role;
	}

	/** 
	 * Set the role.
	 * @param role The role to set
	 */
	public void setRole(int role) {
		this.role = role;
	}

	/** 
	 * Returns the name.
	 * @return String
	 */
	public String getName() {
		return name;
	}

	/** 
	 * Set the name.
	 * @param name The name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/** 
	 * Returns the id.
	 * @return String
	 */
	public int getId() {
		return id;
	}

	/** 
	 * Set the id.
	 * @param id The id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	public ActionErrors validate(
		ActionMapping mapping,
		HttpServletRequest request) {
		ActionErrors ae=new ActionErrors();
		if (name==null) ae.add("name",new ActionError("group.name.req"));
		if (description==null) ae.add("description",new ActionError("group.desc.req"));
		return ae;
	}

}
